// 引用网络请求中间件
import request from '../../utils/request.js';

export default {
	/* 
	 {
	   "deliveryAddressId": "string",
	   "productList": [
	     {
	       "count": 0,
	       "uproductid": "string"
	     }
	   ]
	 }
	 */
	sendOrder(data) {
		return request({
			url: `/productOrderApi/order`,
			method: 'POST',
			data
		})
	},
	/* 
	   "pageNum": 0,
	   "pageSize": 0,
	   "status": "string",
	   "uproductName": "string"
	 */
	getList(data) {
		return request({
			url: `/productOrderApi/list`,
			method: 'POST',
			data
		})
	},
	/* 
	 orderId
	 */
	orderDetail(orderId) {
		return request({
			url: `/productOrderApi/detail?orderId=${orderId}`,
			method: 'GET',
		})
	},
	updateOrder(orderId, status) {
		return request({
			url: `/productOrderApi/update?orderId=${orderId}&status=${status}`,
			method: 'PUT',
		})
	},
	/* 改变问诊状态 */
	clinicalReception(data) {
		return request({
			url: `/consultationOrderApi/clinicalReception`,
			method: 'POST',
			data
		})
	},
}